/**
 * 插件形式: 注册全局公共组件
 * vue插件写法: {install(vue){}}
 * 插件生效: Vue.use(plugins)=> 需要到main.js注册
 */
import PageTools from './PageTools'
import UploadExcel from './UploadExcel'
import UploadImg from './UploadImg'
import ScreenFull from './ScreenFull'
import Lang from './lang'

// 定义数据: 里面放入全局公共组件
const components = [
  PageTools, UploadExcel, UploadImg, ScreenFull, Lang
]
export default {
  /**
   *
   * @param {*} Vue
   */
  install (Vue) {
    // Vue.component('PageTools', PageTools)
    // Vue.component('UploadExcel', UploadExcel)
    components.forEach(item => {
      // item.name  作为批量注册组件的标签名
      Vue.component(item.name, item)
    })
  }
}
